﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace UlyssesAgenda.CoreLib
{
    public class GameObject
    {
        private IGameEngine engine;
        private string canonicalName;
        protected Dictionary<string, string> objectState;

        public GameObject()
        {
            objectState = new Dictionary<string, string>();            
        }

        public IGameEngine Engine
        {
            get
            {
                return engine;
            }
            set
            {
                engine = value;                
            }
        }

        public string CanonicalName
        {
            get
            {
                return canonicalName;
            }
            set
            {
                canonicalName = value;
            }
        }

        public void LoadState()
        {
            objectState = engine.LoadState(this.CanonicalName);
        }

        public void SaveState()
        {
            engine.SaveState(objectState, this.CanonicalName);
        }
                
    }
}
